perm filename MACRO.TEX[TEX,ALS] blob sn#588858 filedate 1981-06-20 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00016 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00003 00002	\input basic			%system basic set
C00004 00003	%change some defaults (more output definitions on page 16 (letter macros))
C00006 00004	%extra fonts...		 w/ magnification
C00007 00005	%randon useful macros
C00011 00006	%spacing macros, valid only within alignments...
C00012 00007	%special indentation macros copied from ehg...
C00013 00008	%vector notation...
C00014 00009	%redundant macros, existing only for {} match check
C00015 00010	%macros for boxes with multiple col alignment, checking {} matches...
C00018 00011	%macros for boxes, right justified entries...
C00021 00012	%macros for boxes, left justified, text mode  entries...
C00025 00013	%macros for matrices = multiple column boxes with surrounding parentheses...
C00028 00014	%table definition: no in-col alignment, cols seprarated by vertical bars..
C00030 00015	%macros for pass-as-is mode
C00032 00016	%macros for letters...(some defs follow those on page 3) Letters need \chpar12←1200
C00036 ENDMK
C⊗;
\input basic			%system basic set

%change some defaults (more output definitions on page 16 (letter macros))

\let\ctrlind=\ctrline
\def\ctrlins#1{\ctrlind{\hskip 1.4truein minus .5truein #1}}

\def\defaultoutput{
\let\ctrline=\ctrlind
\output{\baselineskip 18pt\page
        \if t\numpage{\ctrlind{\curfont a\count0}}
        \else{}
    \advcount0}
\hsize 6.5truein
}

\defaultoutput
\setcount0 1	%set page number to 1.

\def\singlespace{\baselineskip 12vu \lineskip 1vu}
\def\doublespace{
	\baselineskip 16vu
	\lineskip 2vu plus 1vu
	\lineskiplimit 2vu}
\doublespace
\chpar16←1	%allow capitalized words to be split

\def\thesis{
\let\ctrline=\ctrlind
\output{\baselineskip 18pt\hbox to 6.5truein{\hfill\page}
        \if t\numpage{\ctrlins{\curfont a\count0}}
        \else{}
    \advcount0}
\hsize 5.85truein % take off about a half inch from the left margin
}

%extra fonts...		 w/ magnification
{\font h=stan70 at 70truept
		}			%Stanford Seal
{\font b=cmr10 at 15truept
		}			%big letters
{\font c=cmb10 at 12truept
		}			%somewhat big bold letters

%randon useful macros
\def\finish{\par\vfill\eject\end}

%page skipping/encouragement
\def\newpage{\par\vfill\eject}
\let\breakline=\linebreak
\let\breakpage=\pagebreak
\def\linebreak{\hfil\penalty30\hfilneg}
\def\pagebreak{\vfil\penalty100\vfilneg}

%line spacing/skipping
\def\vskipp{\vskip 15vu plus 2vu}	%skip some vertical space
\def\vvskipp{\par \vskip 5vu plus 1vu minus 1vu}	

%optional text...
\def\donothing#1donothing/{}	%used to skip the next chunk of text
\def\dothing#1dothing/{#1}	%used to unskip the next chunk of text

%appending macros for a table of contents...
\def\leaddots{\leaders\hbox to 10pt{\hfill.\hfill}\hfill}
\def\append#1#2{\save#1\vbox{\unbox#1\vskip 6pt\pagebreak\hbox to 5in{#2}}}

%paragraph starting variations
\def\header#1{\par\pagebreak\ctrline{\bf #1}}
\def\parhead #1 {\par\pagebreak\noindent {\bf #1} }
\def\thbody#1thbody/{{\sl #1}}

%math symbols/functions
\def\norm#1{\left\|#1\right\|}	%surround #1 in norm signs in math mode
\def\abs#1{\left|#1\right|}	%surround #1 in abs val signs in math mode
\def\dot{\spose{\raise 6vu \hbox{\hskip 1.5vu.}}}	%put dot over small letter
\def\mthop #1 {\hbox{\bf #1}}		%put math operators in boldface
\def\intersct{\,\textstyle{\inter}\,}	%use small intersection sign
\def\dirsum{\,\textstyle{\osum}\,}	%use small plus-in-circle

%math symbols/ in superscripts
\def\trp{↑{\hbox{\:d T}}}		%append transpose char as only superscript.
\def\tp{\hbox{\:d T}}			%append transpose char in superscript.
\def\inv{↑{-1}}			%append inverse char.
\def\zhi #1 {↑{#1}}		%append superscript
\def\zlo #1 {↓{#1}}		%append subscript
\def\z #1 #2 {↓{#1}↑{#2}}	%append both subscript & superscript

%variables, Q.E.D.
\def\QED{ {$\$\$\$$} }		% $$$ for end of proof.
\def\qed{\par\penalty 1000 \noindent {$\$\$\$$} }	% $$$ for end of proof.
\def\var#1{\hbox{\:d #1}}		%put variables in small caps
\def\k #1 {\hbox{\bf #1\ }}		%put keyword in boldface

%abbreviations....
\let\zo=\zlo
\let\zi=\zhi
\let\qd=\quad
\let\qqd=\qquad

%spacing macros, valid only within alignments...
\def\hzrule{\noalign{\hrule}}	%put in horiz rule
\def\hzrulskp{\vtskip \noalign{\hrule}\vtskip}	%put in horiz rule and skip
\def\hzruleskip{\hzrulskp}			%copy
\def\vtskip{\noalign{\vskip 3vu}}	%skip, used when no vert rule used
\def\vtskipp{\noalign{\vskip 5vu plus 1vu minus 1vu}}	
		%skip, used between formulas
\def\vtrule{\hbox{\vrule height 15vu depth 6vu}}	%long vt rule
\def\vtjoin{\noalign{\vskip -3vu}}
\def\line#1{\noalign{\hbox{#1}}}

%special indentation macros copied from ehg...
\def\Tb{15}
\def\llin{\advcount7 by \Tb}                             %  ((
\def\llout{\par\advcount7 by -\Tb}                        %  ))
\def\ll{\par \hangindent \count7vu \noindent          %  start line
       \hbox{\hskip\count7vu \hskip-\Tb vu}}    
\def\startindent{\parindent 0vu\ragged1000000\jpar10000\setcount7\Tb }
\def\endindent{\par \parindent 20vu \jpar2 \ragged0}

%vector notation...
\def\vec #1 {\hbox{\bf #1}}
\def\va{\vec a }
\def\vb{\vec b }
\def\vc{\vec c }
\def\vd{\vec d }
\def\ve{\vec e }
\def\vf{\vec f }
\def\vg{\vec g }
\def\vh{\vec h }
\def\vi{\vec i }
\def\vj{\vec j }
\def\vk{\vec k }
\def\vl{\vec l }
\def\vm{\vec m }
\def\vn{\vec n }
\def\vo{\vec o }
\def\vp{\vec p }
\def\vq{\vec q }
\def\vr{\vec r }
\def\vs{\vec s }
\def\vt{\vec t }
\def\vu{\vec u }
\def\vv{\vec v }
\def\vw{\vec w }
\def\vx{\vec x }
\def\vy{\vec y }
\def\vz{\vec z }
%redundant macros, existing only for {} match check
\def\mth#1mth/{$#1$}
\def\mthdsp#1mthdsp/{$$#1$$}
\def\hbx#1hbx/{\hbox {#1}}
\def\vbx#1vbx/{\vbox {#1}}
\def\grp#1grp/{{#1}}
%macros for boxes with multiple col alignment, checking {} matches...
\let\spcol=\;
\def\eqalgn#1eqalgn/{\eqalign{#1}}
\def\eqalgnno#1eqalgnno/{\eqalignno{#1}}
\def\bxi#1bxi/{\vcenter{\halign{$\ctr{##}$\cr#1}}}
\def\bxii#1bxii/{\vcenter{\halign{$\ctr{##}\spcol $⊗$\ctr{##}$\cr#1}}}
\def\bxiii#1bxiii/{\vcenter{\halign{$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}$\cr#1}}}
\def\bxiv#1bxiv/{\vcenter{\halign{$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}$\cr#1}}}
\def\bxv#1bxv/{\vcenter{\halign{$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}$\cr#1}}}
\def\bxvi#1bxvi/{\vcenter{\halign{$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}$\cr#1}}}
\def\bxvii#1bxvii/{\vcenter{\halign{$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}$\cr#1}}}
\def\bxviii#1bxviii/{\vcenter{\halign{$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}$\cr#1}}}
\def\bxix#1bxix/{\vcenter{\halign{$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}$\cr#1}}}
\def\bxx#1bxx/{\vcenter{\halign{$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}\spcol $
     ⊗$\ctr{##}$\cr#1}}}

%macros for boxes, right justified entries...
\let\rspcol=\quad 
\def\rbxi#1rbxi/{\vcenter{\halign{$\rt{##}$\cr#1}}}
\def\rbxii#1rbxii/{\vcenter{\halign{$\rt{##}\rspcol $⊗$\rt{##}$\cr#1}}}
\def\rbxiii#1rbxiii/{\vcenter{\halign{$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}$\cr#1}}}
\def\rbxiv#1rbxiv/{\vcenter{\halign{$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}$\cr#1}}}
\def\rbxv#1rbxv/{\vcenter{\halign{$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}$\cr#1}}}
\def\rbxvi#1rbxvi/{\vcenter{\halign{$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}$\cr#1}}}
\def\rbxvii#1rbxvii/{\vcenter{\halign{$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}$\cr#1}}}
\def\rbxviii#1rbxviii/{\vcenter{\halign{$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}$\cr#1}}}
\def\rbxix#1rbxix/{\vcenter{\halign{$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}$\cr#1}}}
\def\rbxx#1rbxx/{\vcenter{\halign{$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}\rspcol $
     ⊗$\rt{##}$\cr#1}}}

%macros for boxes, left justified, text mode  entries...
\let\lspcol=\;
\def\lbxi#1lbxi/{\vcenter{\halign{\lft{##}\cr#1}}}
\def\lbxii#1lbxii/{\vcenter{\halign{\lft{##}$\lspcol $⊗\lft{##}\cr#1}}}
\def\lbxiii#1lbxiii/{\vcenter{\halign{\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}\cr#1}}}
\def\lbxiv#1lbxiv/{\vcenter{\halign{\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}\cr#1}}}
\def\lbxv#1lbxv/{\vcenter{\halign{\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}\cr#1}}}
\def\lbxvi#1lbxvi/{\vcenter{\halign{\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}\cr#1}}}
\def\lbxvii#1lbxvii/{\vcenter{\halign{\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}\cr#1}}}
\def\lbxviii#1lbxviii/{\vcenter{\halign{\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}\cr#1}}}
\def\lbxix#1lbxix/{\vcenter{\halign{\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}\cr#1}}}
\def\lbxx#1lbxx/{\vcenter{\halign{\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}$\lspcol $
     ⊗\lft{##}\cr#1}}}

\def\lbxxvi#1lbxxvi/{\halign{\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\quad\chcode'15←5 
\chcode'15←13 ⊗\lft{##}\cr#1}}

%macros for matrices = multiple column boxes with surrounding parentheses...
\def\mtxi#1mtxi/{\left(\bxi{#1}bxi/\right)}
\def\mtxii#1mtxii/{\left(\bxii{#1}bxii/\right)}
\def\mtxiii#1mtxiii/{\left(\bxiii{#1}bxiii/\right)}
\def\mtxiv#1mtxiv/{\left(\bxiv{#1}bxiv/\right)}
\def\mtxv#1mtxv/{\left(\bxv{#1}bxv/\right)}
\def\mtxvi#1mtxvi/{\left(\bxvi{#1}bxvi/\right)}
\def\mtxvii#1mtxvii/{\left(\bxvii{#1}bxvii/\right)}
\def\mtxviii#1mtxviii/{\left(\bxviii{#1}bxviii/\right)}
\def\mtxix#1mtxix/{\left(\bxix{#1}bxix/\right)}
\def\mtxx#1mtxx/{\left(\bxx{#1}bxx/\right)}

%macros for matrices with right justified entries
\def\rmtxi#1rmtxi/{\left(\rbxi{#1}rbxi/\right)}
\def\rmtxii#1rmtxii/{\left(\rbxii{#1}rbxii/\right)}
\def\rmtxiii#1rmtxiii/{\left(\rbxiii{#1}rbxiii/\right)}
\def\rmtxiv#1rmtxiv/{\left(\rbxiv{#1}rbxiv/\right)}
\def\rmtxv#1rmtxv/{\left(\rbxv{#1}rbxv/\right)}
\def\rmtxvi#1rmtxvi/{\left(\rbxvi{#1}rbxvi/\right)}
\def\rmtxvii#1rmtxvii/{\left(\rbxvii{#1}rbxvii/\right)}
\def\rmtxviii#1rmtxviii/{\left(\rbxviii{#1}rbxviii/\right)}
\def\rmtxix#1rmtxix/{\left(\rbxix{#1}rbxix/\right)}
\def\rmtxx#1rmtxx/{\left(\rbxx{#1}rbxx/\right)}

%macros for tables with left justified entries
\def\lmtxi#1lmtxi/{\left|\lbxi{#1}lbxi/\right|}
\def\lmtxii#1lmtxii/{\left|\lbxii{#1}lbxii/\right|}
\def\lmtxiii#1lmtxiii/{\left|\lbxiii{#1}lbxiii/\right|}
\def\lmtxiv#1lmtxiv/{\left|\lbxiv{#1}lbxiv/\right|}
\def\lmtxv#1lmtxv/{\left|\lbxv{#1}lbxv/\right|}
\def\lmtxvi#1lmtxvi/{\left|\lbxvi{#1}lbxvi/\right|}
\def\lmtxvii#1lmtxvii/{\left|\lbxvii{#1}lbxvii/\right|}
\def\lmtxviii#1lmtxviii/{\left|\lbxviii{#1}lbxviii/\right|}
\def\lmtxix#1lmtxix/{\left|\lbxix{#1}lbxix/\right|}
\def\lmtxx#1lmtxx/{\left|\lbxx{#1}lbxx/\right|}

%table definition: no in-col alignment, cols seprarated by vertical bars..
\let\sepcol=\vtrule
\let\sptable=\ 
\def\table#1table/{\vcenter{\halign{\sepcol\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\chcode'15←5 
\chcode'15←13 ⊗\sptable{##}\sptable\sepcol\cr#1}}}

%macros for pass-as-is mode
%use \passp\parp{...}parp/\endpass for ordinary paragragh
%use \pass\parp... instead of above if paragragh uses macros with args delimited
	%by spaces, like \zlo \zhi \z etc., but then you lose multiple spaces.
%use \pass\mtx??{...}mtx??/\endpass for matrix in math mode (or bx??)
%do NOT follow \pass or \passp with a <CR>, <TAB>, or <SP>.
%do NOT use \pass inside a macro def. or macro arg.
%the sequence \!% or % at the end of a line seems to flush the following <CR>.

\def\crvtjoin{\cr\vtjoin}
\chcode'15←13\let
=\cr\chcode'15←5 
%pass-as-is mode, left justified...
\def\endpass{\chcode'15←5 \chcode'40←10 \chcode'11←10 }
\def\pass{\chcode'11←4 \chcode'15←13 } \endpass 
\def\passp{\chcode'11←4 \chcode'40←13 \chcode'15←13 } \endpass 
\def\parp#1parp/{\par\lbxxvi{#1}lbxxvi/}
%macros for letters...(some defs follow those on page 3) Letters need \chpar12←1200
\def\tex{\hbox{\:aT\hskip-2vu\lower1.94vu\hbox{E}\hskip-2vu X}}
\def\tabright #1{               % skip 3 inches to the right
     \hbox to size {\hskip 3in #1 \hfill}}     % right justify line
\def\lm{\par\hangindent 20vu\noindent}
\def\skipline{\par\vskip 12vu}
\let\vs=\skipline
\def\date #1{
     \null
     \hbox to size{\hfill #1}}
\def\signed #1#2{               % for signature
     \penalty 1000              % force at least one line of text to appear
                                % on the same page as the signature
     \vbox to 70vu {
        \vskip 15vu
        \tabright{#1}
        \vskip .4in
        \tabright{#2} 
        \vskip 0vu plus 1000vu
         }}
\def\pageone{\setcount0 1}
\def\pageoneroman{\setcount0 -1}
\def\setpagenum #1{\setcount0 #1}
\def\pagenumtop{\defaultoutput
    \gdef\firstpage{t}
    \output{ {
         \if t\firstpage {      % if first page
                \gdef\firstpage{f}
                \page}
        \else {
            \if t\numpage{
                \vbox to 20vu {\hbox to size{ \hfill\:g(\count0)\hfill}
                   \vskip 5vu plus 10vu}}
            \else{}
           \vskip 0vu plus 1000vu   % same as on first page
           \page}}
        \advcount0\vfill}}

\gdef\numpage{t}
\def\pagenum{
    \gdef\numpage{t}}
\def\pagenonum{
    \gdef\numpage{f}}

\def\leadrule{\leaders\hrule\hfill}
\def\seal{\vbox to 0pt{\vss\hbox{\raise 60pt\vbox{\hbox{\:h S}}}\vss}
	}
\def\letterhead{\singlespace\pageone\pagenumtop
                \vbox to 80vu{
                    \hbox{\spose{\seal}\lower 8vu 
                    \vbox{
                        \hbox to size{\:b \hfill STANFORD UNIVERSITY \hfill}
                        \hbox to size{\:d\hfill STANFORD, CALIFORNIA 94305 \hfill}
                        }}
                    \vskip 24vu
                    \baselineskip 0vu
                    \hbox to size{\:fNumerical Analysis\hfill\!
                         telephone:415-497-3125}
                    \hbox to size 
                      {\:fDEPARTMENT OF COMPUTER SCIENCE\hfill\!
                         ARPANET:DLB${\scriptscriptstyle\@}$SU-AI}
		    \vfill}
                    \vskip 0vu plus 10000vu	% skip some space
    }